<?php

namespace Book\Model;

use Common\Model\BaseModel;
use Common\Model\ModelException;


class BookModel extends BaseModel
{
    protected $_auto = [
    ];

    protected $_validate = [
    ];

    protected $_scope = [
        'valid' => [
            'where' => ['closed' => 0,'del_time'=>0],
        ]
    ];

    

    protected function _after_find(&$record, $options)
    {
        
    }

    protected function _after_select(&$records, $options)
    {
        foreach ($records as $key => &$value) {
            if (empty($value['author'])) {
                $value['author'] = '陶右一';
            }
        }   
    }

    
}
